const systemInfo=uni.getSystemInfoSync();

//获取状态栏高度
const getStatusBarHeight=()=>systemInfo.statusBarHeight || 20;

//获取标题栏高度
const getTitleBarHeight=()=>{
	// #ifdef MP-WEIXIN
	let menuBarInfo=uni.getMenuButtonBoundingClientRect();
	let titleBarHeight=menuBarInfo.height+(menuBarInfo.top-getStatusBarHeight())*2;
	return titleBarHeight;
	// #endif
	return 40;
	
}


const system={
	state:{
		statusBarHeight:getStatusBarHeight(),
		titleBarHeight:getTitleBarHeight(),
		foldState:false
	},
	mutations:{ 
		setFoldState(state,value){
			 state.foldState=value;
		}
	}
}

export default system;